LOADER_SOURCES= \
	$(X32_PACKAGE_ROOT)/x32/loader/loader.c \
	$(X32_PACKAGE_ROOT)/x32/loader/loader_helper.bc \
	$(X32_PACKAGE_ROOT)/x32/loader/shell.c \

.PHONY : clean all default nubloader upload

all : nubloader
default : nubloader
nubloader : nubloader.ce

nubloader.ce : $(LOADER_SOURCES)
	lcc-x32 $(LOADER_SOURCES) -o nubloader.ce -Wo-base=7D000

upload : nubloader.ce
	x32-upload nubloader.ce -c $(X32_PACKAGE_SERIAL) -l 7D000 -e 

clean :
	rm -f nubloader.ce